Skip to content

fix(tests): destroy browser-held connections before closing fixture servers - #24

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
fix/close-fixture-server-connections
Aug 29, 2026
Merged

fix(tests): destroy browser-held connections before closing fixture servers#24
ScriptedAlchemy merged 1 commit into
mainfrom
fix/close-fixture-server-connections

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

Follow-up to #20, which merged while its final Verify (Node 22.19.0) run was still executing; that run then failed in evals-real.e2e.test.ts > ignores delayed client-A suite and run-list completions after the client scope changes, timing out at its full 120s budget with all 4 assertions completed — i.e. the hang was in the finally block's fixture.close().

Root cause: the shared closeServer teardown in packages/workbench/tests/support/http.ts only calls server.close(), which per Node semantics waits for any connection that still has a request in flight. On a two-core CI runner the Playwright page can hold a request open at close time, so teardown blocks for the entire test budget. This was previously band-aided for the sibling client-scope test only (ad3a5bc navigated to about:blank before closing), leaving the same latent hang in this test and the other closeServer consumers (mcp-page-app-browser.test.ts, comparisons-page-client-scope-browser.test.ts).

Fix: destroy connections via server.closeAllConnections() before server.close() — the same teardown pattern already used throughout runtime-client-surface-proxy.test.ts — making close() deterministic regardless of browser connection state, and drop the now-redundant about:blank navigation. This eliminates the race rather than enlarging a timeout.

Test plan

  • pnpm typecheck
  • evals-real.e2e.test.ts (all 8 tests) green with CI=1, including under taskset -c 0,1 to mirror the two-core runner
  • Other closeServer consumers green: mcp-page-app-browser.test.ts, comparisons-page-client-scope-browser.test.ts

…ervers

Node's server.close() waits for any connection that still has a request in
flight, so the shared closeServer teardown could hang for the full test
budget on two-core CI runners whenever the Playwright page held a request
open at close time. The client-scope Eval test hit exactly this after its
last assertion; an earlier fix (ad3a5bc) band-aided only the sibling test
by navigating to about:blank first. Destroy the connections before close(),
matching the runtime-client-surface-proxy teardown pattern, and drop the
now-redundant navigation.
@changeset-bot

changeset-bot Bot commented Aug 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b04b5e8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T02:38:20.409634Z b04b5e8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Aug 29, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@24
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/rsc-runtime@24

commit: b04b5e8

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b04b5e8bc5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/workbench/tests/support/http.ts
@ScriptedAlchemy
ScriptedAlchemy merged commit 0b1c78f into main Aug 29, 2026
14 of 16 checks passed
ScriptedAlchemy added a commit that referenced this pull request Aug 29, 2026
- close the fixture-server listener before destroying held connections so
  a reconnecting browser cannot slip a new request past teardown (#24)
- honor AGENT_BUNDLE_PACKAGE_PREBUILT in public-api.test.ts so the parallel
  integration pool never rewrites the shared dist directories (#27)
- move packed-release.e2e into the packed suite so `pnpm test` and
  `check:release` stop running the same long packed-browser suite twice,
  retiring the now-empty serial integration pool (#22)
- reconcile the fidelity ledger with the desktop-only capture interface and
  drop the retired mobile.png evidence (#22)
@ScriptedAlchemy
ScriptedAlchemy deleted the fix/close-fixture-server-connections branch September 3, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant